cmake_minimum_required(VERSION 2.8)

include_directories(${ASL_SRC_DIR})
link_directories(${ASL_SRC_DIR})

#add_definitions(-DASL_USE_CPP11)

if(BUILD_SHARED_LIBS)
    add_executable(asl_test main.cpp)
    target_link_libraries(asl_test funs -pthread -ldl)
    set_target_properties(asl_test PROPERTIES 
        DEBUG_OUTPUT_NAME "asl_test${CMAKE_DEBUG_POSTFIX}")
    install(TARGETS asl_test DESTINATION bin)
endif()

if(BUILD_STATIC_LIBS)
    add_executable(asl_test_static main.cpp)
    add_definitions(-DASL_STATICLIB)
    target_link_libraries(asl_test_static funs_static -pthread -ldl)
    set_target_properties(asl_test_static PROPERTIES 
        DEBUG_OUTPUT_NAME "asl_test_static${CMAKE_DEBUG_POSTFIX}")
    install(TARGETS asl_test_static DESTINATION bin)
endif()
